package com.zhuangxiaoyan.designpattern.proxymodel.staticproxy;

/**
 * @Classname TecherDaoProxy
 * @Description 代理对象
 * @Date 2022/5/1 10:22
 * @Created by xjl
 */
public class TecherDaoProxy implements TecherDao{

    private TecherDao target;// 目标对象 通过接口来聚合

    public TecherDaoProxy(TecherDao target) {
        this.target = target;
    }

    @Override
    public void tech() {
        System.out.println("代理开始…………");
        target.tech();
        System.out.println("代理结束…………");
    }
}